<?php
use \yii\helpers\Html;
?>
<div class="yx-praise-list-box yx-praise-box yx-radius2 zx-min-height" style="padding: 0 20px">
    <div class="docs-main zx-mg">
        <table id="tablesaw" class="tablesaw table yx-table1 yx-table5 table-striped with-check"  data-tablesaw-mode="swipe" data-tablesaw-minimap >
            <thead>
            <tr class="yx-bgd2f6ec">
                <th></th>
                <th><?=\Yii::t('zhtfrontend','商品名称');?></th>
                <th><?=\Yii::t('zhtfrontend','商品编号');?></th>
                <th><?=\Yii::t('zhtfrontend','分类名称');?></th>
                <th><?=\Yii::t('zhtfrontend','品牌名称');?></th>
                <th><?=\Yii::t('zhtfrontend','机构');?></th>
                <th><?=\Yii::t('zhtfrontend','库存');?></th>
                <th><?=\Yii::t('zhtfrontend','价格');?></th>
                <th><?=\Yii::t('zhtfrontend','成本价');?></th>
                <th><?=\Yii::t('zhtfrontend','市场价');?></th>
                <th><?=\Yii::t('zhtfrontend','是否可购买');?></th>
                <th><?=\Yii::t('zhtfrontend','商品类型');?></th>
            </thead>
            <?php if(!empty($goodsgroup)):?>
                <?php foreach($goodsgroup as $item):?>
                    <tr value="<?=$item['id']?>">
                        <td><input type="checkbox" name="goodsId" value="<?=$item['id']?>"></td>
                        <td><?=$item['name']?></td>
                        <td><?=$item['sn']?></td>
                        <td><?=$item['cate_name']?></td>
                        <td><?=$item['brand_name']?></td>
                        <td><?=$item['mechanic_name']?></td>
                        <td><?=$item['store']?></td>
                        <td><?=$item['price']?></td>
                        <td><?=$item['cost']?></td>
                        <td><?=$item['market_price']?></td>
                        <td><?=$item['is_buy']?></td>
                        <td><?=$item['goods_type']?></td>
                    </tr>
                <?php endforeach;?>
            <?php endif;?>
        </table>

    </div>
<table width="100%" class="yx-member-box yx-member-box1">
    <tr id="goodscat_id">
        <td width="200" align="right">分类</td>
        <td>
            <?=(!empty($category)&&isset($category->name))?$category->name:'';?>
        </td>
    </tr>
    <tr id="goodsbrand_id">
        <td width="200" align="right">品牌</td>
        <td>
            <?=(!empty($brand)&&isset($brand->name))?$brand->name:'';?>
        </td>
    </tr>
    <tr id="goodsname">
        <td width="200" align="right"><?= $model->attributeLabels()['name']; ?></td>
        <td>
            <?=Html::encode($model->name);?>
        </td>
    </tr>
    <tr id="goodssn">
        <td width="200" align="right"><?= $model->attributeLabels()['sn']; ?></td>
        <td>
            <?=Html::encode($model->sn);?>
        </td>
    </tr>
    <tr id="goodsprice">
        <td width="200" align="right"><?= $model->attributeLabels()['price']; ?></td>
        <td>
            <?=Html::encode($model->price);?>
        </td>
    </tr>
    <tr id="goodscost">
        <td width="200" align="right"><?= $model->attributeLabels()['cost']; ?></td>
        <td>
            <?=Html::encode($model->cost);?>
        </td>
    </tr>
    <tr id="goodsmarket_price">
        <td width="200" align="right"><?= $model->attributeLabels()['market_price']; ?></td>
        <td>
            <?=Html::encode($model->market_price);?>
        </td>
    </tr>
    <tr id="goodsstore">
        <td width="200" align="right"><?= $model->attributeLabels()['store']; ?></td>
        <td>
            <?=Html::encode($model->store);?>
        </td>
    </tr>
    <tr id="goodspicture">
        <td width="200" align="right"><?= $model->attributeLabels()['picture']; ?></td>
        <td>
            <img height="100" width="200" src="<?=Html::encode($model->picture)?>"/>
        </td>
    </tr>
    <tr id="goodsdescription">
        <td width="200" align="right"><?= $model->attributeLabels()['description']; ?></td>
        <td>
            <?=$model->description;?>
        </td>
    </tr>
    <tr id="goodscontent">
        <td width="200" align="right"><?= $model->attributeLabels()['content']; ?></td>
        <td>
            <?=$model->content;?>
        </td>
    </tr>
    <tr id="goodsmechanic_id">
        <td width="200" align="right">机构</td>
        <td>
            <?=(!empty($mechanic)&&isset($mechanic->name))?$mechanic->name:'';?>
        </td>
    </tr>
    <tr id="goodsmax_buy">
        <td width="200" align="right"><?= $model->attributeLabels()['max_buy']; ?></td>
        <td>
            <?=Html::encode($model->max_buy);?>
        </td>
    </tr>
    <tr id="goodsscore">
        <td width="200" align="right"><?= $model->attributeLabels()['score']; ?></td>
        <td>
            <?=Html::encode($model->score);?>
        </td>
    </tr>
    <tr id="goodsstore_prompt">
        <td width="200" align="right"><?= $model->attributeLabels()['store_prompt']; ?></td>
        <td>
            <?=Html::encode($model->store_prompt);?>
        </td>
    </tr>
    <tr id="goodsnostore_sell">
        <td width="200" align="right"><?= $model->attributeLabels()['nostore_sell']; ?></td>
        <td>
            <?=Html::encode($model->nostore_sell=='Y'?'是':'否');?>
        </td>
    </tr>
    <tr id="goodsis_buy">
        <td width="200" align="right"><?= $model->attributeLabels()['is_buy']; ?></td>
        <td>
            <?=Html::encode($model->is_buy=='1'?'是':'否');?>
        </td>
    </tr>
    <tr id="goodsis_show">
        <td width="200" align="right"><?= $model->attributeLabels()['is_show']; ?></td>
        <td>
            <?=Html::encode($model->is_show=='1'?'是':'否');?>
        </td>
    </tr>
    <tr id="goodsis_shelve">
        <td width="200" align="right"><?= $model->attributeLabels()['is_shelve']; ?></td>
        <td>
            <?=Html::encode($model->is_shelve=='1'?'上架':'下架');?>
        </td>
    </tr>
    <?=$AttributeDetails?>
</table>
</div>
